how to pass a variable from one function to another in django